<template>
	<view class="menu-list" style="margin:0;">
		<!-- 合同拟稿 -->
		<uni-collapse accordion v-model="accordionVal">
			<uni-collapse-item :show-animation="true">
				<template v-slot:title>
					<view class="list-cell">
					    <view class="menu-item-box">
					      <view class="iconfont">&#xe64a;</view>
					      <view class="u_title">合同拟稿</view>
					    </view>
					</view>
				</template>					
				<view class="list-cell list-cell-arrow" @click="contractDraft">
				    <view class="menu-item-box">
				      <view class="u_title">草稿合同</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="contractTemplate">
				    <view class="menu-item-box">
				      <view class="u_title">合同模板</view>
				    </view>
				</view>
			</uni-collapse-item>
		    <!-- 合同签署 -->
			<uni-collapse-item :show-animation="true">
				<template v-slot:title>
					<view class="list-cell">
						<view class="menu-item-box">
							<view class="iconfont">&#xe62b;</view>
							<view class="u_title">合同签署</view>
						</view>
					</view>
				</template>					
				<view class="list-cell list-cell-arrow" @click="contractSign">
				    <view class="menu-item-box">
				      <view class="u_title">待我签署</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="signByOur" v-if="$store.getters.staffInfo.companyId != 0">
				    <view class="menu-item-box">
				      <view class="u_title">待我方签署</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="signByOther">
				    <view class="menu-item-box">
				      <view class="u_title">待他方签署</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="signOk">
				    <view class="menu-item-box">
				      <view class="u_title">签署全通过</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="signBack">
				    <view class="menu-item-box">
				      <view class="u_title">签署已终止</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="signCopy">
				    <view class="menu-item-box">
				      <view class="u_title">已抄送合同</view>
				    </view>
				</view>
			</uni-collapse-item>
		   <!-- 合同档案 -->
			<uni-collapse-item :show-animation="true">
				<template v-slot:title>
					<view class="list-cell">
						<view class="menu-item-box">
							<view class="iconfont">&#xec5c;</view>
							<view class="u_title">合同档案</view>
						</view>
					</view>
				</template>					
				<view class="list-cell list-cell-arrow" @click="listAllOk">
				    <view class="menu-item-box">
				      <view class="u_title">已生效合同</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="listExpired">
				    <view class="menu-item-box">
				      <view class="u_title">已临期合同</view>
				    </view>
				</view>
				<view class="list-cell list-cell-arrow" @click="listInvalid">
				    <view class="menu-item-box">
				      <view class="u_title">已失效合同</view>
				    </view>
				</view>
			</uni-collapse-item>
		</uni-collapse>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				accordionVal:'',
				extraIcon: {
					color:'#ccc',
					size:'22',
					type:'compose',
				},				
			}
		},
		methods: {
			/** 草稿合同 */
			contractDraft() {
				this.$tab.navigateTo('./contract/contract')
			},
			/** 合同模板 */
			contractTemplate(){
				if(this.$store.getters.staffInfo.companyId == 0){
					this.$tab.navigateTo('/pages/mine/personal/template/onlineTemplate')
				}else{
					this.$tab.navigateTo('./contract/template')
				}
			},
			/** 待我签署 */
			contractSign() {
				this.$tab.navigateTo('./contractSign/listMe')
			},
			/** 待我方签署 */
			signByOur(){
				this.$tab.navigateTo('./contractSign/listOur')
			},
			/** 待他方签署 */
			signByOther(){
				this.$tab.navigateTo('./contractSign/listOther')
			},
			/** 签署全通过 */
			signOk(){
				this.$tab.navigateTo('./contractSign/listAllSuccess')
			},
			/** 签署已终止 */
			signBack(){
				this.$tab.navigateTo('./contractSign/listBack')
			},
			/** 已抄送合同 */
			signCopy(){
				this.$tab.navigateTo('./contractSign/listCopy')
			},
			/** 已生效合同 */
			listAllOk() {
				this.$tab.navigateTo('./contractArchives/listAllOk')
			},
			/** 已临期合同 */
			listExpired() {
				this.$tab.navigateTo('./contractArchives/listExpired')
			},
            /** 已失效合同 */
			listInvalid() {
				this.$tab.navigateTo('./contractArchives/listInvalid')
			},		
		}
	}
</script>

<style lang="scss" scoped>
	// 折叠面板修改
	::v-deep .uni-collapse-item__title-arrow{
		transform:rotate(-90deg);
	}
	::v-deep .uni-collapse-item__title-arrow-active{
		transform:rotate(0deg);
	}
	::v-deep .uniui-bottom{
		color:#ccc !important;
		font-size: 30rpx !important;
	}
	.u_title {
		margin-left: 10rpx;
	}
	// 二级列表
	.list-cell-arrow{
		padding:36rpx 65rpx;
		font-size: 26rpx;
		color:#666666;
		&:hover{
			color:$uni-color-primary;
		}
	}
</style>
